var initReviewTab = function() {
		YEvent.delegate("reviewListTable", "click", viewReview, '.view-review-link');
		YEvent.delegate("reviewListTable", "click", deleteReview, '.delete-review-link');
		
};
	
var viewReview = function(event) {
	
	// 'this' refers to element that was clicked
	var parentRow = getParentRow(this);
	// Make xhr call get entity details
	var id = parentRow.readAttribute("reviewId");
	getTabContent("reviews/edit?reviewId="+id);
	
};




var createNewReview = function() {
	goToTab("REVIEWS");
	getTabContent("reviews/add");
		
};

var returnToReviewList = function() {
	getTabContent("reviews");
};

var deleteReview = function(event){
	
	
	if (confirm("Are you want to delete?")) {
		// 'this' refers to element that was clicked
		var parentRow = getParentRow(this);
		// Make xhr call get entity details
		var id = parentRow.readAttribute("reviewId");
		getTabContent("reviews/delete?reviewId="+id);
	} else {
		return false;
	}
};